import Vue from "vue"
import VueRouter from "vue-router"
import Login from "../views/Login"

import AdminHome from "../views/admin/AdminHome"
import Home from "../views/admin/ShouYe"
import CInformation from "../views/admin/CInformation"
import adminUInformation from "../views/admin/UInfomation"
import RInformation from "../views/admin/RInformation"
import CompanyEdit from "../views/admin/CompanyEdit"
import UserEdit from "../views/admin/UserEdit"
import RecruitEdit from "../views/admin/RecruitEdit"

import CompanyHome from "../views/company/CompanyHome"
import ComHome from "../views/company/ShouYe"
import ComRInformation from "../views/company/RInformation"
import ComRecruitEdit from "../views/company/RecruitEdit"
import Delivery from "../views/company/Delivery"

import Index from "../views/user/Index"
import Recruit from "../views/user/Recruit"
import Personal from "../views/user/Personal"
import UserHome from "../views/user/Home"
import RecruitDetail from "../views/user/RecruitDetail"

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "/Login",
    component: Login,
  },
  {
    path: "/adminHome",
    name: "/AdminHome",
    component: AdminHome,
    children: [
      {
        path: "/admin/home",
        name: "/Home",
        component: Home
      },
      {
        path: "/admin/cInformation",
        name: "/CInformation",
        component: CInformation
      },
      {
        path: "/admin/rInformation",
        name: "/RInformation",
        component: RInformation
      },
      {
        path: "/admin/uInformation",
        name: "/adminUInformation",
        component: adminUInformation
      },

      {
        path: "/admin/companyEdit",
        name: "/CompanyEdit",
        component: CompanyEdit
      },
      {
        path: "/admin/userEdit",
        name: "/UserEdit",
        component: UserEdit
      },
      {
        path: "/admin/recruitEdit",
        name: "/RecruitEdit",
        component: RecruitEdit
      }
    ]
  },

  {
    path: "/companyHome",
    name: "/CompanyHome",
    component: CompanyHome,
    children: [
      {
        path: "/company/home",
        name: "/ComHome",
        component: ComHome
      },
      {
        path: "/company/rInformation",
        name: "/ComRInformation",
        component: ComRInformation
      },
      {
        path: "/company/rEdit",
        name: "/ComRecruitEdit",
        component: ComRecruitEdit
      },
      {
        path: "/company/delivery",
        name: "/Delivery",
        component: Delivery
      }
    ]
  },

  {
    path: "/index",
    name: "/Index",
    component: Index,
    children: [
      {
        path: "/user/recruit",
        name: "/Recruit",
        component: Recruit,
      },
      {
        path: "/user/personal",
        name: "/Personal",
        component: Personal,
      },
      {
        path: "/userHome",
        name: "/UserHome",
        component: UserHome
      },
      {
        path: "/user/recruitDetail",
        name: "/RecruitDetail",
        component: RecruitDetail
      }
    ]
  }
];

const router = new VueRouter({
  routes,
});

export default router;
